<?php
    /**
     * Created by PhpStorm.
     * User: huangzhongwei
     * Date: 2018/11/5
     * Time: 19:36
     */

    namespace app\api\validate;


    use app\lib\exception\ParameterException;

    class Withdrawal extends BaseValidate
    {
        protected $rule = [
            'money' => 'float|modten',
        ];

        protected function modten($value, $rule = '', $data = '', $field = '')
        {
            if ($value % 10 != 0) {
                return $field . "必须为10的倍数";
            }

            return true;
        }


    }